<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改群信息')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-groups-edit" th:object="${groups}">
            <input name="groupId" th:field="*{groupId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">群名称：</label>
                <div class="col-sm-8">
                    <input name="name" th:field="*{name}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">群公告：</label>
                <div class="col-sm-8">
                    <textarea name="notification"  class="form-control" >*{notification}</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">群简介：</label>
                <div class="col-sm-8">
                    <textarea name="introduction"  class="form-control" >*{introduction}</textarea>
                </div>
            </div>
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">群头像：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <img src="*{faceUrl}"/>-->
<!--                    <input name="faceUrl"  class="form-control" type="file">-->
<!--                </div>-->
<!--            </div>-->

            <div class="form-group">
                <label class="col-sm-3 control-label">创建者：</label>
                <div class="col-sm-8">
                    <input name="creatorUserId" th:field="*{creatorUserId}" class="form-control" type="hidden">
                </div>
            </div>

        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "im/groups";
        $("#form-groups-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-groups-edit').serialize());
            }
        }

        $("input[name='notificationUpdateTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>